import scrapy


class BaiduSpider(scrapy.Spider):
    name = "baidu"
    # allowed_domains = ["baidu.com"]
    start_urls = ["https://quotes.toscrape.com/"]

    # async def start(self):
    #     yield scrapy.Request('https://httpbin.org/get?a=10')


    def parse(self, response):
        # print(response.text)
        h1 = response.css('.header-box div h1')
        a = h1.css('a::attr(href)').get()
        text = h1.css('a::text').get()

        print(a)
        print(text)



